﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;

namespace Web.Admin
{
    public partial class HoaDonBanManager : System.Web.UI.Page
    {
        HoaDonBanBL _HoaDonBan = new HoaDonBanBL();
        protected void Page_Load(object sender, EventArgs e)
        {
            FillData();
        }

        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
        }

        private void FillData()
        {
            GridView1.DataSource = _HoaDonBan.GetHoaDonBan();
            GridView1.DataBind();
        }

        public string GetIconDuyet(string DuyetHang)
        {
            if (DuyetHang == "True")
            {
                return "<span class='glyphicon glyphicon-gift' aria-hidden='true'></span> Đã Giao";
            }

            return "<span class='glyphicon glyphicon-shopping-cart' aria-hidden='true'></span> Chưa Giao";
        }
    }
}